package com.juzishuke.margin.s2.controller;

import com.juzishuke.margin.base.dto.bill.req.RepayPlanSearchReq;
import com.juzishuke.margin.base.dto.bill.res.RepayPlanDTO;
import com.juzishuke.margin.common.response.MarginResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.juzishuke.margin.feign.sample.api.FeignSample;

import java.util.List;


/**
 * @author : libo@juzishuke.com
 * @Title :
 * @Description :
 * @date : 2024/4/9 16:33
 * @since :1.0
 */
@Slf4j
@RestController
public class MarginBaseController {
    
    @Autowired
    private FeignSample feignSample;

    @GetMapping("abc")
    public MarginResponse abc() {
        RepayPlanSearchReq repayPlanSearchReq = new RepayPlanSearchReq();
        repayPlanSearchReq.setOrderId("123");
        repayPlanSearchReq.setBillCode("NET");
        MarginResponse<List<RepayPlanDTO>> netRepayPlansResponse = feignSample.getRepayPlan(repayPlanSearchReq);
        return netRepayPlansResponse;
    }
}
